package com.xopencode.stream;

/**
 * @author Mcb
 * @date 2022/4/28
 * @apiNote
 */
public class Ticket {

    int ticket = 100;

    public int getTicket() {
        return ticket;
    }

    public int buy(){
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return ticket--;
    }
}
